<!--
 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
 * Copyright (C) 2003-2010 Frederico Caldeira Knabben
 *
 * == BEGIN LICENSE ==
 *
 * Licensed under the terms of any of the following licenses at your
 * choice:
 *
 *  - GNU General Public License Version 2 or later (the "GPL")
 *    http://www.gnu.org/licenses/gpl.html
 *
 *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
 *    http://www.gnu.org/licenses/lgpl.html
 *
 *  - Mozilla Public License Version 1.1 or later (the "MPL")
 *    http://www.mozilla.org/MPL/MPL-1.1.html
 *
 * == END LICENSE ==
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>FCKEnterKey</title>
	<script src="../../../editor/_source/fckscriptloader.js" type="text/javascript"></script>
	<script src="../_common/manual_test.js" type="text/javascript"></script>
	<script type="text/javascript">

var FCK = {} ;

FCKScriptLoader.Load( 'FCKDebug' ) ;
FCKScriptLoader.Load( 'FCKEnterKey' ) ;

	</script>
	<script type="text/javascript">

FCKConfig.Debug = false ;
FCKConfig.BasePath = '../../../editor/' ;

var oInnerWindow ;
var oEnterKey ;

function InnerLoaded( innerWindow )
{
	oInnerWindow = innerWindow ;

	oEnterKey = new FCKEnterKey( innerWindow ) ;
}

function GetHtml()
{
	document.getElementById('xHtml').value = oInnerWindow.document.body.innerHTML ;
}

function SetEnterMode( mode )
{
	oEnterKey.EnterMode = mode ;
}

function SetShiftEnterMode( mode )
{
	oEnterKey.ShiftEnterMode = mode ;
}

	</script>
</head>
<body>
	<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td>
				<h1 style="margin-bottom: 5px">
					FCKEnterKey</h1>
				<p>
					Enter:
					<select onclick="SetEnterMode( this.value );">
						<option value="p" selected="selected">P</option>
						<option value="div">DIV</option>
						<option value="br">BR</option>
					</select>
					Shift + Enter:
					<select onclick="SetShiftEnterMode( this.value );">
						<option value="p">P</option>
						<option value="div">DIV</option>
						<option value="br" selected="selected">BR</option>
					</select>
				</p>
			</td>
		</tr>
		<tr>
			<td height="100%">
				<iframe src="test1_inner.html" width="100%" height="100%" frameborder="1"></iframe>
			</td>
		</tr>
		<tr>
			<td>
				<br />
				<input type="button" value="Get HTML" onclick="GetHtml();" /><br />
				<textarea id="xHtml" rows="10" cols="80" style="width: 100%"></textarea></td>
		</tr>
	</table>
</body>
</html>
